#!/usr/bin/python  
import socket  
import sys  
import os  
#grab the banner  
def grab_banner(ip_address,port):  
      try:  
           s=socket.socket()  
           s.connect((ip_address,port))  
           banner = s.recv(1024) 
	   print port 
           print banner 
      except:  
           return  
def checkVulns(banner):  
      if len(sys.argv) >=2:  
           filename = sys.argv[1]  
           for line in filename.readlines():  
                line = line.strip('\n')  
                if banner in line:  
                     print "%s is vulnerable" %banner  
                else:  
                     print "%s is not vulnerable"  
def main():  
	portList = [21,22,25,80,110]  
	ip_address= sys.argv[1]
#	ip_address = input("Entrez THE THUNG HERE \n")
	for port in portList:
	#	ip_address= input("Entrez THE THING HERE \n")
		#ip_address = "88.191.137.199"
		grab_banner(ip_address,port)
	 #BULLSHIT
     # for x in range(0,255):  
     #      for port in portList:  
     #           ip_address = '192.168.0.' + str(x)  
     #           grab_banner(ip_address,port)  
if __name__ == '__main__':  
      main()  
